home *** CD-ROM | disk | FTP | other *** search
/ Laboratorio Interattivo Deagostini / laboratorio interattivo deagostini.bin / swf / 11404.swf / scripts / frame_1 / PlaceObject2_23_33 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2003-01-07  |  2KB  |  67 lines

  1. onClipEvent(enterFrame){
  2.    function cliprilasciata(cheistanza)
  3.    {
  4.       var problema = 0;
  5.       var i = 0;
  6.       i = 0;
  7.       while(i < lista.length)
  8.       {
  9.          if(lista[i][0].toLowerCase() == cheistanza.toLowerCase())
  10.          {
  11.             problema = 1;
  12.             var trovato = 0;
  13.             var giusto = 0;
  14.             var e = 0;
  15.             e = 0;
  16.             while(e < lista[i][2].length)
  17.             {
  18.                daintercett = "_root." + lista[i][2][e];
  19.                if(eval(daintercett).hitTest(_root._xmouse,_root._ymouse,true))
  20.                {
  21.                   trovato = 1;
  22.                   if(lista[i][2][e] == lista[i][1])
  23.                   {
  24.                      giusto = 1;
  25.                   }
  26.                   if(SoloGiusta == 1 & giusto == 1)
  27.                   {
  28.                      Posizionate += 1;
  29.                      getUrl("Giusto!", "");
  30.                      eval(percorsoMobile)[cheIstanza]._x = eval(daintercett)._x;
  31.                      eval(percorsoMobile)[cheIstanza]._y = eval(daintercett)._y;
  32.                      eval(percorsoMobile)[cheIstanza].gotoAndStop(2);
  33.                   }
  34.                   break;
  35.                }
  36.                e++;
  37.             }
  38.             if(trovato == 1)
  39.             {
  40.                if(giusto == 0)
  41.                {
  42.                   eval(percorsoMobile)[cheistanza]._x = eval(percorsoMobile)[cheistanza].xorig;
  43.                   eval(percorsoMobile)[cheistanza]._y = eval(percorsoMobile)[cheistanza].yorig;
  44.                }
  45.             }
  46.             else
  47.             {
  48.                getUrl("Sbagliato!", "");
  49.                eval(percorsoMobile)[cheistanza]._x = eval(percorsoMobile)[cheistanza].xorig;
  50.                eval(percorsoMobile)[cheistanza]._y = eval(percorsoMobile)[cheistanza].yorig;
  51.             }
  52.             break;
  53.          }
  54.          i++;
  55.       }
  56.       if(problema == 0)
  57.       {
  58.          eval(percorsoMobile)[cheistanza]._x = eval(percorsoMobile)[cheistanza].xorig;
  59.          eval(percorsoMobile)[cheistanza]._y = eval(percorsoMobile)[cheistanza].yorig;
  60.       }
  61.       if(Posizionate == lista.length)
  62.       {
  63.          getUrl("GiocoFinito!", "");
  64.       }
  65.    }
  66. }
  67.